Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distribute binaries via npm module #1269

Merged
merged 11 commits into from
Aug 6, 2024
Merged

Distribute binaries via npm module #1269

merged 11 commits into from
Aug 6, 2024

Conversation

kailan
Copy link
Member

@kailan kailan commented Aug 5, 2024

This PR adds a step to the release workflow that generates npm modules for each supported platform, as well as a parent module (@fastly/cli) that pulls in the correct version for the user using optionalDependencies.

This is to enable @harmony7's work in creating a npm init @fastly/compute command that can generate Compute projects using the CLI. It will now be possible to run commands without installing the CLI, e.g. npx @fastly/cli compute init as well as depend on the CLI from package.json in npm projects.

It also allows developers without the Fastly CLI to run commands such as npm run dev in JavaScript Compute projects (if defined), starting Viceroy.

Tagging @JakeChampion as he wrote the code in the wizer repo that I based this upon: https://github.com/bytecodealliance/wizer/tree/main/npm/wizer

@kailan kailan added enhancement New feature or request DO NOT MERGE YET github_actions Pull requests that update GitHub Actions code labels Aug 5, 2024
npm/@fastly/cli/package-helpers.js Outdated Show resolved Hide resolved
npm/@fastly/cli/package.json Outdated Show resolved Hide resolved
Copy link
Member

@harmony7 harmony7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. I have a minor suggestion.

npm/@fastly/cli/package-lock.json Outdated Show resolved Hide resolved
@Integralist
Copy link
Collaborator

Chatted with @kailan earlier and made sure I understood how this all works, but asked that some additional documentation be written that explains how it works for those unfamiliar with all the NPM magic (e.g. people like myself 🙂).

RELEASE.md Show resolved Hide resolved
@kailan kailan merged commit 2d8f880 into main Aug 6, 2024
8 checks passed
@kailan kailan deleted the npm-module branch August 6, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants